import request from "../../utils/request";

//获取产品列表
export function getProductList(params) {
  return request({
    url: "/pro/list",
    data: params,
  });
}

//修改产品推荐
export function updateRecommend(params) {
  return request({
    url: "/pro/updateFlag",
    method: "post",
    data: { ...params, type: "isrecommend" },
  });
}

//修改产品秒杀
export function updateSeckill(params) {
  return request({
    url: "/pro/updateFlag",
    method: "post",
    data: { ...params, type: "isseckill" },
  });
}

//获取商品分类
export function getProductCategory() {
  return request({
    url: "/pro/getCategory",
  });
}

//筛选商品
export function getProductFilter(params) {
  return request({
    url: "/pro/searchPro",
    method: "post",
    data: params,
  });
}
